<template>
  <div class="home">
    <!-- 设置路由出口 -->
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
    <van-tabbar
      v-model="active"
      placeholder
      route
      active-color="#d0584d"
      inactive-color="#000"
    >
      <van-tabbar-item icon="home-o" to="/index">首页</van-tabbar-item>
      <van-tabbar-item icon="search" to="/search">搜索</van-tabbar-item>
      <van-tabbar-item icon="play-circle-o" to="/video">视频</van-tabbar-item>
      <van-tabbar-item icon="contact" to="/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style>
.home {
  height: 100%;
}
</style>
